import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import echarts from './views/charts/echarts.vue'

//=============================我们自己开发的页面
import SystemDictionary from './views/system/SystemDictionary.vue'
import SystemRole from './views/system/SystemRole.vue'
import SystemUser from "./views/system/SystemUser";

import ForumSection from "./views/forum/ForumSection";
import ForumPost from "./views/forum/ForumPost";

import Form from "./views/nav1/Form";
import Table from "./views/nav1/Table";
import user from "./views/nav1/user";


//=============================我们自己开发的页面

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '首页',
        leaf: true,
        iconCls: 'fa fa-bar-chart',
        children: [
            {path: '/echarts', component: echarts, name: '首页'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'el-icon-s-home',//图标样式class
        children: [
            {path: '/system/user', component: SystemUser, name: '用户管理'},
            {path: '/system/role', component: SystemRole, name: '角色管理'},
            {path: '/system/dictionary', component: SystemDictionary, name: '数据字典'},
            {path: '/system/form', component: Form, name: '表单'},
            {path: '/system/table', component: Table, name: '表格'},
            {path: '/system/user', component: user, name: '用户'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '论坛管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            {path: '/forum/section', component: ForumSection, name: '论坛版块'},
            {path: '/forum/post', component: ForumPost, name: '论坛帖子'}
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: {path: '/404'}
    }
];

export default routes;